settings object

This method will read the data contained in a string value.

string read_string(string value_name)

Parameters:
value_name
The name of the value to read.

Return value:
The value data on success, or a blank string on failure.

Remarks:
If an error occurs, the method will return a blank string and the last_error flag will be set.

Example:
// Read a user license from the registry.

void main()
{
settings game_data;
bool success=game_data.setup("Testtime Interactive", "Bonebreaker", false);
if(!success)
{
alert("Error", "Could not access the registry.");
exit();
}
if(!game_data.exists("user_registration"))
{
alert("Error", "Could not read user_registration. The specified value does not exist.");
exit();
}
string reg=game_data.read_string("user_registration");
if(last_error<0)
{
alert("Error", "Could not access user_registration.");
exit();
}
alert("User Registration", reg);
}